package ${package}

import org.apache.commons.lang3.StringUtils
import com.ibeetl.admin.core.annotation.Query
import com.ibeetl.admin.core.util.Tool
import com.ibeetl.admin.core.util.enums.CoreDictType
import com.ibeetl.admin.core.web.query.PageParam
import java.util.Date

/**
 *${entity.displayName}查询
 */
data class ${entity.name}Query(
@ var size = attrs.~size;
    @for(var i=0; i < size; i++) {
    @var attr = attrs[i];
        @if(isNotEmpty(attr.dictType)) {
    \@Query(name = "${attr.displayName}", display = true,type=Query.TYPE_DICT,dict="${attr.dictType}")
    var ${attr.name}: ${attr.javaType} ?= null,
        @} else if(attr.dateRange) {
    \@Query(name = "${attr.displayName}", display = true,type=Query.TYPE_DATE_BETWEEN)
    var ${attr.name}:String? = null,
    var ${strutil.replace (attr.name,"Range","")}Start: Date? = null,
    var ${strutil.replace (attr.name,"Range","")}End: Date? = null,
        @} else if(attr.dateTimeRange) {
    \@Query(name = "${attr.displayName}", display = true,type=Query.TYPE_DATETIME_BETWEEN)
    var ${attr.name}: String>? = null,
    var ${strutil.replace (attr.name,"Range","")}Start: Date? = null,
    var ${strutil.replace (attr.name,"Range","")}End: Date? = null,
        @} else {
    \@Query(name = "${attr.displayName}", display = true)
        @if(i != size - 1){
    var ${attr.name}: ${attr.javaType}? = null,
        @} else {
    var ${attr.name}: ${attr.javaType}? = null
        @}
        @}
    @}
): PageParam()
